<template>
  <el-aside wclass="layout-aside">
    <el-menu :default-openeds="['1', '3']">
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-message"></i>导航
        </template>
        <el-menu-item-group>
          <template slot="title">分组一</template>
          <el-menu-item index="1-1" @click="openMap">地图</el-menu-item>
          <el-menu-item index="1-2">选项2</el-menu-item>
        </el-menu-item-group>
        <el-menu-item-group title="分组2">
          <el-menu-item index="1-3">选项3</el-menu-item>
        </el-menu-item-group>
        <el-submenu index="1-4">
          <template slot="title">选项4</template>
          <el-menu-item index="1-4-1">选项4-1</el-menu-item>
        </el-submenu>
      </el-submenu>
    </el-menu>
  </el-aside>
</template>
<script>
export default {
  name: "Aside",
  data() {
    return {};
  },
  mounted() {
      this.openDashboard();
  },
  methods: {
    openDashboard() {
        this.$router.push({path:'/dashboard'})
    },
    openMap(){
        this.$router.push({path:'/mymap'})
    }
  }
};
</script>
<style>
.layout-aside {
  float: left;
  background-color: rgb(238, 241, 246);
  height: calc(100vh - 60px);
  overflow: auto;
}
</style>